Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(1769): [3] Modify webhook plugin to use queue webhook #2627

Merged
merged 5 commits into from
Jan 11, 2022

Conversation

yk634
Copy link
Contributor

@yk634 yk634 commented Jan 6, 2022

Context

This is the implementation that follows #2622.
I modify the webhook plugin to POST the webhook received from SCM to the queue service endpoint /v1/queue/message?type=webhook when queueWebhookEnabled is true.

Objective

  • Add queueWebhookEnabled to config so that users can choose whether or not to queue the webhook.
  • Add an object queueWebhook to server.app so that the following items can be used from the plugins.
    • Whether or not to use the queueWebhook set in config.
    • An instance of the executor plugin.
  • Make the executor.enqueueWebhook method to POST to /v1/queue/message?type=webhook to be executed according to the queueWebhookEnabled setting.

References

Please do not merge this PR until after the following PRs have been merged.

#1769 (comment)

License

I confirm that this contribution is made under a BSD license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@coveralls
Copy link

coveralls commented Jan 6, 2022

Coverage Status

Coverage increased (+0.003%) to 95.488% when pulling 60e01ae on sonic-screwdriver-cd:use-queue-webhooks into dc76d77 on screwdriver-cd:master.

@yk634 yk634 changed the title [WIP] feat(1769): Modify webhook plugin to use queue webhook feat(1769): [3] Modify webhook plugin to use queue webhook Jan 7, 2022
ibu1224
ibu1224 previously approved these changes Jan 7, 2022
Copy link
Contributor

@ibu1224 ibu1224 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

itleigns
itleigns previously approved these changes Jan 7, 2022
@yk634 yk634 dismissed stale reviews from itleigns and ibu1224 via 60e01ae January 11, 2022 02:52
@tkyi tkyi merged commit 7874879 into screwdriver-cd:master Jan 11, 2022
@wahapo wahapo deleted the use-queue-webhooks branch January 12, 2022 01:03
@wahapo
Copy link
Contributor

wahapo commented Jan 12, 2022

This PR is included in version 4.1.185

The release is available on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants